Panel Data

Linear Models for Panel Data

Vladislav Morozov

This Block

We will do something

Learning Outcomes

References

TYPES OF DATA

The Three Types of Data

Most (economic) research today uses panel

Why Panel Data

Key advantage of panel data: several observations of potential outcomes per unit

  • Units with different treatments in different periods: (partially) observe the individual effect
  • Units with no change in treatment: still can be used for learning about changes in other units

BINARY TREATMENT

EVENT STUDIES

Simple Event Study Setting

Begin with the simplest possible panel setting with binary treatment:

  • Two periods with \(N\) units:
    • No treatment in period 1.
    • All units treated in period 2.
  • Data: outcomes \((Y_{i1}, Y_{i2})\).

Object of interest: “average effect of treatment”

Simple Estimator — Average Change

Simplest approach: compute average change in \(Y_{it}\) across periods \[ \widehat{AE}_{ES} = \dfrac{1}{N}\sum_{i=1}^N (Y_{i2}- Y_{i1}). \tag{1}\]

Estimator (1) — simplest example of event study estimators (see Freyaldenhoven et al. 2021; Miller 2023).

Example Framework

Possible empirical framework

  • Units \(i\): firms that make phones
  • Outcome \(Y_{it}\): their stock price
  • Periods:
    1. One week before Apple announces the iPhone.
    2. One week after the announcement

Effect of interest: change in stock prices due to the announcement of iPhone

What Does (1) Do?

Proposition 1 (Asymptotics for \(\widehat{AE}_{ES}\)) Let

  • (Cross-sectional random sampling): \((Y_{i1}, Y_{i2})\) be independent and identically distributed (IID)
  • Finite first moments: \(\E[\abs{Y_{it}}]<\infty\)

Then \[ \widehat{AE}_{ES} \xrightarrow{p} \E[Y_{i2} - Y_{i1}]. \]

Causal Framework

Is \(\E[Y_{i2} - Y_{i1}]\) interesting (=causal)?

Need a causal framework to talk about causal effects!

Work in the familiar potential outcomes framework:

  • \(Y_{it}^0\) — outcome for \(i\) in period \(t\) if not treated
  • \(Y_{i1}^1\) — outcome for \(i\) in period \(t\) if treated
  • Treatment effect for \(i\) in \(t\): \(Y_{it}^1- Y_{it}^0\)

For short, use \(Y_{it}^d\) where \(d=0, 1\)

Limit of ES Estimator and Causality

Potential and realized outcomes are connected as \[ Y_{i2} = Y_{i2}^1, \quad Y_{i1} = Y_{i1}^0. \]

It follows that \[ \widehat{AE}_{ES} \xrightarrow{p} \E[Y_{i2}^2- Y_{i1}^1]. \]

\(\E[Y_{i2}^2- Y_{i1}^1]\) is not necessarily a treatment effect — mixes effect of treatment and effects of time!

Example

Context Again consider the iPhone example. Then

  • \(Y_{i2}^1 - Y_{i2}^0\) — treatment effect, change in price because of the iPhone announcement
  • \(Y_{i2}^0 - Y_{i0}^0\) — change in a world without iPhone

We see combination of both changes \[ Y_{i2} - Y_{i1} = Y_{i2}^1- Y_{i1}^0 = [Y_{i2}^1- Y_{i2}^0] + [Y_{i2}^0 - Y_{i0}^0] \]

Solution: Restrict Changes over Time

Simple solution: rule out changes over time

Assumption: no variation in potential outcomes \[ Y_{i2}^d= Y_{i1}^d, \quad d=0, 1 \]

Then \(\widehat{AE}_{ES}\) is estimating a causal parameter — average effects \[ \begin{aligned} \widehat{AE}_{ES} & \xrightarrow{p} \E[Y_{i1}^1- Y_{i1}^0] = \E[Y_{i2}^1- Y_{i2}^0] \end{aligned} \]

Summary so Far

Regression Setting

Can also connect \(\widehat{AE}_{ES}\) and OLS

Consider regression model \[ \begin{aligned} Y_{it} & = \beta_0 + \beta_1 D_{it} + u_{it}, \\ D_{it} & = \begin{cases} 1, & t= 1 \\ 0, & t =0 \end{cases} \end{aligned} \tag{2}\] where we simply treat \((Y_{i1}, D_{i1})\) and \((Y_{i2}, D_{i2})\) as separate observations

Event Study and OLS

  1. Can use all results developed for OLS for \(\widehat{AE}_{ES}\)
  2. Regressing \(Y_{it}\) on \(D_{it}\) gives a causal parameter
    • Under no trends
    • No experiment was necessary

Event Study and Regression

A way to think about regression in causal settings:

  • Write down the regression in terms of parameters of interest: e.g. let \[ \beta_0 = \E[Y_{i0}^0], \quad \beta_1 = \E[Y_{i2}^1- Y_{i2}^0] \]

  • Connect regression to potential outcomes: what is \(u_{it}\) in terms of potential outcomes?

  • Check properties of this \(u_{it}\). If \(u_{it}\) is “nice”, apply OLS (or another method)

Extending to Multiple Periods and Adding Covariates

Expanded Regression

  • Suppose \(T\) periods, treatment begins at \(t_0\).
  • Regression model: \[ Y_{it} = \beta_0 + \sum_{\tau = t_0}^{T} \beta_\tau D_{it} + u_{it}. \]
  • Estimates: \[ \hat{\beta}^{OLS} = \dfrac{1}{N} \sum_{i=1}^N (Y_{i\tau} - Y_{i1}). \]

Dynamic Treatment Effects

  • No trends assumption rules out dynamic effects.
  • Relax assumption: impose “no trends” on untreated outcome \(Y_{it}(0)\).
  • Under this assumption: \[ \dfrac{1}{N} \sum_{i=1}^N (Y_{i\tau} - Y_{i1}) \xrightarrow{p} \E[Y_{i\tau}(1)- Y_{i1}(0)] = \E[Y_{i\tau}(1) - Y_{i\tau}(0)]. \]
  • Consistently estimates average effects in period \(\tau\).

Event Study Origins

Pretrend Test

  • Cannot directly test “no trends” assumption.
  • Can examine pre-treatment period outcomes:
    • If outcomes change over time, assumption might be problematic.

DiD

Slide

Things happen

LINEAR MODELS

SUBSECTION

Beyond Binary Treatments

We want

References

Freyaldenhoven, Simon, Christian Hansen, Jorge Pérez Pérez, and Jesse Shapiro. 2021. “Visualization, Identification, and Estimation in the Linear Panel Event-Study Design.” w29170. Cambridge, MA: National Bureau of Economic Research. https://doi.org/10.3386/w29170.
Huntington-Klein, Nick. 2025. The Effect: An Introduction to Research Design and Causality. S.l.: Chapman and Hall/CRC.
Miller, Douglas L. 2023. “An Introductory Guide to Event Study Models.” Journal of Economic Perspectives 37 (2): 203–30. https://doi.org/10.1257/jep.37.2.203.
Wooldridge, Jeffrey M. 2020. Introductory Econometrics: A Modern Approach. Seventh edition. Boston, MA: Cengage.